pro color_table_RWB

device, decomposed=0
ncolors = 255
steps = 128
scaleFactor = FINDGEN(steps) / (steps - 1)
; Do first half colors (red to white).
; Red vector: 255 -> 0
R = REPLICATE(ncolors, steps)
; Green vector: 255 -> 0
G = 0 + (0 + ncolors) * scaleFactor
; Blue vector: 0 -> 255
B = 0 + (0 + ncolors) * scaleFactor

k = 0
for i = 0, ncolors-1, 16 do begin
print, i, R(i), G(i), B(i), k
k = k + 1
endfor
;
;
TVLCT, R, G, B

;display the sample
image = FINDGEN(255) # REPLICATE(1, 60)
WINDOW, XSIZE=255, YSIZE=60
TV, BYTE(image)
end